<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">

    <title>{$title}</title>
    <link rel="shortcut icon" href="/favicon.ico">

    <!--[if lt IE 8]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->

    <link href="/public/admin/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="/public/admin/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/public/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/public/admin/css/animate.css" rel="stylesheet">
    <link href="/public/admin/css/style.css?v=4.0.0" rel="stylesheet">
    <link href="/public/admin/css/ourstyle.css?v=4.0.0" rel="stylesheet">
    <link href="/public/admin/js/plugins/layer/skin/layer.css" rel="stylesheet">
<style>

</style>
    <!-- 全局js -->
    <script src="/public/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/public/admin/js/bootstrap.min.js?v=3.3.5"></script>
    <!-- 自定义js -->
    <script src="/public/admin/js/content.js?v=1.0.0"></script>
    <script src="/public/admin/js/plugins/layer/layer.min.js"></script>
    <script src="/public/admin/plugins/laydate/laydate.js"></script>
    <script src="/public/admin/js/article.js"></script>
    <script src="/public/admin/js/common.js"></script>
    <!-- CKeditor -->
    <script src="/public/admin/plugins/ckeditor/ckeditor.js"></script>
    <script type="text/javascript" src="/public/admin/plugins/ckfinder/ckfinder.js"></script>
    <!-- iCheck -->
    <script src="/public/admin/js/plugins/iCheck/icheck.min.js"></script>
</head>

<body class="fixed-sidebar full-height-layout gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title" style="display:none">
                    <h5>修改</h5>
                </div>
                <div class="ibox-content">
                    <ul class="nav nav-tabs">
                        <li class="active"><a data-toggle="tab" href="#tab-1"> {:lang('essential_information')}</a></li>
                    </ul>
                    <br/>
                    <div class="row">
                    <form action="{:url('Card/wayHandle')}" method="post" id="boxFrom" class="form-horizontal">
                        <div class="tab-content">
                            <div id="tab-1" class="tab-pane active">
                                <div class="form-group" data-name="title">
                                    <label class="col-sm-2 control-label">路线名称：</label>
                                    <div class="col-sm-8">
                                        <input class="configInput form-control" name="name" type="text" value="{$info.name}" required="" aria-required="true">
                                    </div>
                                </div>
                                <div class="form-group" data-name="title">
                                    <label class="col-sm-2 control-label">路线点：</label>
                                    <div class="col-sm-8">
                                        <input class="configInput form-control" name="points" type="text" value="{$info.points}" required="" aria-required="true">
                                    </div>
                                </div>
                                <div class="form-group" data-name="excel">
                                    <label class="col-sm-2 control-label"> 导入人员名单：</label>
                                    <div class="col-sm-8">
                                        <div class="input-group">
                                            <input type="text" class="form-control" name="excel" id="excel" value="{$info.excel}"> <span class="input-group-btn"> <button type="button" class="btn btn-primary" onclick="BrowseServer('excel');">{:lang('select_file')}</button> </span>
                                        </div>
                                    </div>
                                    <div class="col-sm-2">
                                        <a href="javascript:void(0)" data-toggle="tooltip" class="btn btn-info" data-original-title="{:lang('download_template')}" title="{:lang('download_template')}" onclick="getUserTemplate(this,'/index.php/Admin/Card/getUserTemplate?act=excel')"><i class="fa fa-download">{:lang('download_template')}</i></a>
                                    </div>
                                </div>
                                <div class="form-group" data-name="starttime">
                                    <label class="col-sm-2 control-label"> 活动开始时间：</label>
                                    <div class="col-sm-8">
                                        <input class="configInput form-control" name="starttime" id="starttime" type="text" onclick="laydate({elem: '#starttime',istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" required="" aria-required="true" value="{$info.starttime}">
                                    </div>
                                </div>
                                <div class="form-group" data-name="endtime">
                                    <label class="col-sm-2 control-label"> 活动结束时间：</label>
                                    <div class="col-sm-8">
                                        <input class="configInput form-control" name="endtime" id="endtime" type="text" onclick="laydate({elem: '#endtime',istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" required="" aria-required="true" value="{$info.endtime}">
                                    </div>
                                </div>

                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-2">
                                <input type="hidden" name="act" value="{$act}">
                                <input type="hidden" name="id" value="{$info.id}">
                                <button class="btn btn-primary" onclick="ajax_submit_form('boxFrom','{:url('Card/wayHandle')}')" type="button">{:lang('preservation')}</button>
                            </div>
                        </div>
                    </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    function getUserTemplate(obj,url) {
        $.ajax({
            url : url,
            type : "post",
            data : {id:'temp'},
            dataType : "json",
            success:function(data){
                console.log(data)
                if (data.status == 0) {
                    top.layer.msg(data.message);
                } else {
                    top.layer.msg(data.message,{time:2000},function(){
                        window.location.href=data.file;
                    });
                }
            }
        });
    }
</script>
</body>
</html>
